Integrand size = 38, antiderivative size = 168 \[ \int (g \cos (e+f x))^p (A+B \sin (e+f x)) (c-c \sin (e+f x))^{-3-p} \, dx=\frac {(A+B) (g \cos (e+f x))^{1+p} (c-c \sin (e+f x))^{-3-p}}{f g (5+p)}+\frac {(2 A-B (3+p)) (g \cos (e+f x))^{1+p} (c-c \sin (e+f x))^{-2-p}}{c f g (3+p) (5+p)}+\frac {(2 A-B (3+p)) (g \cos (e+f x))^{1+p} (c-c \sin (e+f x))^{-1-p}}{c^2 f g (1+p) (3+p) (5+p)} \]
(A+B)*(g*cos(f*x+e))^(p+1)*(c-c*sin(f*x+e))^(-3-p)/f/g/(5+p)+(2*A-B*(3+p)) *(g*cos(f*x+e))^(p+1)*(c-c*sin(f*x+e))^(-2-p)/c/f/g/(p^2+8*p+15)+(2*A-B*(3 +p))*(g*cos(f*x+e))^(p+1)*(c-c*sin(f*x+e))^(-1-p)/c^2/f/g/(3+p)/(p^2+6*p+5 )
Time = 0.19 (sec) , antiderivative size = 119, normalized size of antiderivative = 0.71 \[ \int (g \cos (e+f x))^p (A+B \sin (e+f x)) (c-c \sin (e+f x))^{-3-p} \, dx=-\frac {\cos (e+f x) (g \cos (e+f x))^p (c-c \sin (e+f x))^{-p} \left (-B (3+p)+A \left (7+6 p+p^2\right )+(3+p) (-2 A+B (3+p)) \sin (e+f x)+(2 A-B (3+p)) \sin ^2(e+f x)\right )}{c^3 f (1+p) (3+p) (5+p) (-1+\sin (e+f x))^3} \]
-((Cos[e + f*x]*(g*Cos[e + f*x])^p*(-(B*(3 + p)) + A*(7 + 6*p + p^2) + (3 + p)*(-2*A + B*(3 + p))*Sin[e + f*x] + (2*A - B*(3 + p))*Sin[e + f*x]^2))/ (c^3*f*(1 + p)*(3 + p)*(5 + p)*(-1 + Sin[e + f*x])^3*(c - c*Sin[e + f*x])^ p))
Time = 0.66 (sec) , antiderivative size = 155, normalized size of antiderivative = 0.92, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {3042, 3338, 3042, 3151, 3042, 3150}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (A+B \sin (e+f x)) (c-c \sin (e+f x))^{-p-3} (g \cos (e+f x))^p \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (A+B \sin (e+f x)) (c-c \sin (e+f x))^{-p-3} (g \cos (e+f x))^pdx\) |
\(\Big \downarrow \) 3338 |
\(\displaystyle \frac {(2 A-B (p+3)) \int (g \cos (e+f x))^p (c-c \sin (e+f x))^{-p-2}dx}{c (p+5)}+\frac {(A+B) (c-c \sin (e+f x))^{-p-3} (g \cos (e+f x))^{p+1}}{f g (p+5)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {(2 A-B (p+3)) \int (g \cos (e+f x))^p (c-c \sin (e+f x))^{-p-2}dx}{c (p+5)}+\frac {(A+B) (c-c \sin (e+f x))^{-p-3} (g \cos (e+f x))^{p+1}}{f g (p+5)}\) |
\(\Big \downarrow \) 3151 |
\(\displaystyle \frac {(2 A-B (p+3)) \left (\frac {\int (g \cos (e+f x))^p (c-c \sin (e+f x))^{-p-1}dx}{c (p+3)}+\frac {(c-c \sin (e+f x))^{-p-2} (g \cos (e+f x))^{p+1}}{f g (p+3)}\right )}{c (p+5)}+\frac {(A+B) (c-c \sin (e+f x))^{-p-3} (g \cos (e+f x))^{p+1}}{f g (p+5)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {(2 A-B (p+3)) \left (\frac {\int (g \cos (e+f x))^p (c-c \sin (e+f x))^{-p-1}dx}{c (p+3)}+\frac {(c-c \sin (e+f x))^{-p-2} (g \cos (e+f x))^{p+1}}{f g (p+3)}\right )}{c (p+5)}+\frac {(A+B) (c-c \sin (e+f x))^{-p-3} (g \cos (e+f x))^{p+1}}{f g (p+5)}\) |
\(\Big \downarrow \) 3150 |
\(\displaystyle \frac {(A+B) (c-c \sin (e+f x))^{-p-3} (g \cos (e+f x))^{p+1}}{f g (p+5)}+\frac {(2 A-B (p+3)) \left (\frac {(c-c \sin (e+f x))^{-p-2} (g \cos (e+f x))^{p+1}}{f g (p+3)}+\frac {(c-c \sin (e+f x))^{-p-1} (g \cos (e+f x))^{p+1}}{c f g (p+1) (p+3)}\right )}{c (p+5)}\) |
((A + B)*(g*Cos[e + f*x])^(1 + p)*(c - c*Sin[e + f*x])^(-3 - p))/(f*g*(5 + p)) + ((2*A - B*(3 + p))*(((g*Cos[e + f*x])^(1 + p)*(c - c*Sin[e + f*x])^ (-2 - p))/(f*g*(3 + p)) + ((g*Cos[e + f*x])^(1 + p)*(c - c*Sin[e + f*x])^( -1 - p))/(c*f*g*(1 + p)*(3 + p))))/(c*(5 + p))
3.11.34.3.1 Defintions of rubi rules used
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_), x_Symbol] :> Simp[b*(g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x ])^m/(a*f*g*m)), x] /; FreeQ[{a, b, e, f, g, m, p}, x] && EqQ[a^2 - b^2, 0] && EqQ[Simplify[m + p + 1], 0] && !ILtQ[p, 0]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_), x_Symbol] :> Simp[b*(g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x ])^m/(a*f*g*Simplify[2*m + p + 1])), x] + Simp[Simplify[m + p + 1]/(a*Simpl ify[2*m + p + 1]) Int[(g*Cos[e + f*x])^p*(a + b*Sin[e + f*x])^(m + 1), x] , x] /; FreeQ[{a, b, e, f, g, m, p}, x] && EqQ[a^2 - b^2, 0] && ILtQ[Simpli fy[m + p + 1], 0] && NeQ[2*m + p + 1, 0] && !IGtQ[m, 0]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*c - a*d)*(g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x])^m/(a*f*g*(2*m + p + 1) )), x] + Simp[(a*d*m + b*c*(m + p + 1))/(a*b*(2*m + p + 1)) Int[(g*Cos[e + f*x])^p*(a + b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && EqQ[a^2 - b^2, 0] && (LtQ[m, -1] || ILtQ[Simplify[m + p], 0 ]) && NeQ[2*m + p + 1, 0]
\[\int \left (g \cos \left (f x +e \right )\right )^{p} \left (A +B \sin \left (f x +e \right )\right ) \left (c -c \sin \left (f x +e \right )\right )^{-3-p}d x\]
Time = 0.32 (sec) , antiderivative size = 131, normalized size of antiderivative = 0.78 \[ \int (g \cos (e+f x))^p (A+B \sin (e+f x)) (c-c \sin (e+f x))^{-3-p} \, dx=\frac {{\left ({\left (B p - 2 \, A + 3 \, B\right )} \cos \left (f x + e\right )^{3} + {\left (B p^{2} - 2 \, {\left (A - 3 \, B\right )} p - 6 \, A + 9 \, B\right )} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + {\left (A p^{2} + 2 \, {\left (3 \, A - B\right )} p + 9 \, A - 6 \, B\right )} \cos \left (f x + e\right )\right )} \left (g \cos \left (f x + e\right )\right )^{p} {\left (-c \sin \left (f x + e\right ) + c\right )}^{-p - 3}}{f p^{3} + 9 \, f p^{2} + 23 \, f p + 15 \, f} \]
((B*p - 2*A + 3*B)*cos(f*x + e)^3 + (B*p^2 - 2*(A - 3*B)*p - 6*A + 9*B)*co s(f*x + e)*sin(f*x + e) + (A*p^2 + 2*(3*A - B)*p + 9*A - 6*B)*cos(f*x + e) )*(g*cos(f*x + e))^p*(-c*sin(f*x + e) + c)^(-p - 3)/(f*p^3 + 9*f*p^2 + 23* f*p + 15*f)
\[ \int (g \cos (e+f x))^p (A+B \sin (e+f x)) (c-c \sin (e+f x))^{-3-p} \, dx=\int \left (g \cos {\left (e + f x \right )}\right )^{p} \left (- c \left (\sin {\left (e + f x \right )} - 1\right )\right )^{- p - 3} \left (A + B \sin {\left (e + f x \right )}\right )\, dx \]
\[ \int (g \cos (e+f x))^p (A+B \sin (e+f x)) (c-c \sin (e+f x))^{-3-p} \, dx=\int { {\left (B \sin \left (f x + e\right ) + A\right )} \left (g \cos \left (f x + e\right )\right )^{p} {\left (-c \sin \left (f x + e\right ) + c\right )}^{-p - 3} \,d x } \]
\[ \int (g \cos (e+f x))^p (A+B \sin (e+f x)) (c-c \sin (e+f x))^{-3-p} \, dx=\int { {\left (B \sin \left (f x + e\right ) + A\right )} \left (g \cos \left (f x + e\right )\right )^{p} {\left (-c \sin \left (f x + e\right ) + c\right )}^{-p - 3} \,d x } \]
Time = 12.10 (sec) , antiderivative size = 234, normalized size of antiderivative = 1.39 \[ \int (g \cos (e+f x))^p (A+B \sin (e+f x)) (c-c \sin (e+f x))^{-3-p} \, dx=-\frac {{\left (g\,\cos \left (e+f\,x\right )\right )}^p\,\left (30\,A\,\cos \left (e+f\,x\right )-15\,B\,\cos \left (e+f\,x\right )-2\,A\,\cos \left (3\,e+3\,f\,x\right )+3\,B\,\cos \left (3\,e+3\,f\,x\right )-12\,A\,\sin \left (2\,e+2\,f\,x\right )+18\,B\,\sin \left (2\,e+2\,f\,x\right )+2\,B\,p^2\,\sin \left (2\,e+2\,f\,x\right )+24\,A\,p\,\cos \left (e+f\,x\right )-5\,B\,p\,\cos \left (e+f\,x\right )+4\,A\,p^2\,\cos \left (e+f\,x\right )+B\,p\,\cos \left (3\,e+3\,f\,x\right )-4\,A\,p\,\sin \left (2\,e+2\,f\,x\right )+12\,B\,p\,\sin \left (2\,e+2\,f\,x\right )\right )}{c^3\,f\,{\left (-c\,\left (\sin \left (e+f\,x\right )-1\right )\right )}^p\,\left (p^3+9\,p^2+23\,p+15\right )\,\left (15\,\sin \left (e+f\,x\right )+6\,\cos \left (2\,e+2\,f\,x\right )-\sin \left (3\,e+3\,f\,x\right )-10\right )} \]
-((g*cos(e + f*x))^p*(30*A*cos(e + f*x) - 15*B*cos(e + f*x) - 2*A*cos(3*e + 3*f*x) + 3*B*cos(3*e + 3*f*x) - 12*A*sin(2*e + 2*f*x) + 18*B*sin(2*e + 2 *f*x) + 2*B*p^2*sin(2*e + 2*f*x) + 24*A*p*cos(e + f*x) - 5*B*p*cos(e + f*x ) + 4*A*p^2*cos(e + f*x) + B*p*cos(3*e + 3*f*x) - 4*A*p*sin(2*e + 2*f*x) + 12*B*p*sin(2*e + 2*f*x)))/(c^3*f*(-c*(sin(e + f*x) - 1))^p*(23*p + 9*p^2 + p^3 + 15)*(15*sin(e + f*x) + 6*cos(2*e + 2*f*x) - sin(3*e + 3*f*x) - 10) )